package cn.edu.ustc.xrovers.action;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import cn.edu.ustc.xrovers.model.NonFinancialInfoRatio;
import cn.edu.ustc.xrovers.model.ProcessedStatement;
import cn.edu.ustc.xrovers.service.LoanIndexService;

import com.opensymphony.xwork2.ActionSupport;

public class LoanIndexAction extends ActionSupport{

	private ProcessedStatement ps;
	private NonFinancialInfoRatio nfir;
	private Integer id;
	private String companyId;
	private int year;
	private LoanIndexService li;
	
	@Override
	public String execute() throws Exception {
		HttpSession session=ServletActionContext.getRequest().getSession();
		nfir=li.getQualitativeIndex(companyId, year, session);
		ps=li.getQuantitativeIndex(companyId, year, session);
		return "success";
	}

	public void setNfir(NonFinancialInfoRatio nfir) {
		this.nfir = nfir;
	}

	public NonFinancialInfoRatio getNfir() {
		return nfir;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setLi(LoanIndexService li) {
		this.li = li;
	}

	public LoanIndexService getLi() {
		return li;
	}

	public void setPs(ProcessedStatement ps) {
		this.ps = ps;
	}

	public ProcessedStatement getPs() {
		return ps;
	}

	public void setCompanyId(String companyId) {
		this.companyId = companyId;
	}

	public String getCompanyId() {
		return companyId;
	}

	public void setYear(int year) {
		this.year = year;
	}

	public int getYear() {
		return year;
	}
}
